package com.audaque.springboot.foshanupload.web.mpdemo.mpgt.action;

import cn.hutool.core.lang.UUID;
import com.audaque.springboot.foshanupload.web.mpdemo.mpgt.model.pojo.SysUserMpgtPojo;
import com.baomidou.mybatisplus.extension.toolkit.SqlHelper;
import com.baomidou.mybatisplus.extension.toolkit.SqlRunner;
import io.swagger.v3.oas.annotations.Operation;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlCommandType;
import org.apache.ibatis.scripting.defaults.RawSqlSource;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

/**
 * @author zgb
 * @desc ...
 * @date 2023-05-29 08:53:23
 */
@RestController
@RequestMapping("sqlRunner")
public class SqlRunnerController {


    @Operation(summary = "列表查询")
    @RequestMapping(value = "/run", method = {RequestMethod.GET})
    public  List<Map<String, Object>> run() throws Exception {
        List<Map<String, Object>> mapList = SqlRunner.db().selectList("select * from test_example limit 1,10");
        return mapList;
    }

}
